<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS 动画</title>
    <style>
        .d1 {
            width: 200px;
            height: 200px;
            background: brown;
        }

        .d1:hover {
            width: 299px;
            background: magenta;
        }

        .box {
            width: 200px;
            height: 200px;
            background: #2db34a;
            border-radius: 6px;
            transition-property: background, border-radius;
            transition-duration: .2s, 1s;
            transition-timing-function: linear;
        }

        .box:hover {
            background: #ff7b29;
            border-radius: 50%;
        }

        .ma {
            width: 200px;
            height: 200px;
            background: rgba(14, 203, 228, 0.301);
        }

        .ma:hover {
            width: 499px;
            background: magenta;
        }

        .hr {
            border: 2px green solid;
            width: 200px;
            transition: all 0.1s ease-in;
        }

        .hr:hover {
            width: 566px;
        }

        .ml {
            position: relative;
            top: 0;
            left: 0;
            width: 299px;
            height: 299px;
            background-color: pink;
            animation: lhn 3s;
        }

        @keyframes lhn {
            from {
                background-color: pink;
            }

            to {
                background-color: springgreen;
            }
        }

        .mxx {
            position: relative;
            top: 0;
            left: 0;
            width: 299px;
            height: 299px;
            border-right: 6px dashed red;
            border-color: salmon;
            transform: rotate(110deg);
        }

        .mxx:hover {
            background-color: violet;
            transform: rotate(330deg);

        }

    </style>
</head>

<body>
    <section>
        <h2>动画模拟</h2>
        <div class="d1"></div>
        <div class="box"></div>
        <div class="ma"></div>
    </section>
    <section>
        <h2>线性动画模拟</h2>
        <div class="hr"></div>
    </section>
    <section>
        <h2>动画变化</h2>
        <div class="ml"></div>
    </section>
    <section>
        <h2>动画转化</h2>
        <div class="mxx"></div>
    </section>
</body>

</html>
